home *** CD-ROM | disk | FTP | other *** search
- ANYWHERE.EXE - A modification to Where for multiple hard disk users.
-
- Anywhere grew out of a need for our corporate users who have installed
- 60 Meg Priam drives to search multiple hard disk directories for files
- matching a particular file string. One of our users had discovered
- WHERE.C in PC TECH JOURNAL and asked me to convert it to compile on his
- Lattice 2.14 C compiler. After the program was distributed they came
- back with "It works fine but what we really need is a program that can
- search all our drives if we want it too.". Since not everyone had the
- same number of Hard drives I decided to utilize the set command to create
- an environment string that could be used to guide WHERE as to what drives
- should be searched. By doing this a user can place the set command in
- their autoexec.bat file tailored to his particular hard disk setup. So
- far no complaints.
-
- John Teichert Jr
- Information System Center
- 117 14th Street
- Atlanta, Georgia 30309
- (404)-892-2400 x346
-
- DISTRIBUTION RIGHTS:
-
- WHERE - Originally Written by Mark S. Ackerman with the following copyright.
-
- PROGRAM IS WRITTEN IN MARK WILLIAMS M W C 8 6 LANGUAGE
- Copyright 1984, 1985 by Mark S. Ackerman. Permission is
- granted for unlimited copies if not sold or otherwise
- exchanged for gain.
- PUBLISHED IN PC TECH JOURNAL - OCT '85 - VOL 3, NO. 10
-
- ANYWHERE - Modifications to WHERE to allow mulitiple disk drives to be searched.
-
- Program modifications written to Microsoft Version 3.00 C compiler
- specifications.
- Modifications: Copyright 1985, 1986 by John Teichert Jr.
- Permission is granted to utilize the modifications for unlimited
- distribution if not sold or otherwise exchanged for gain.
-
- WARRANTIES:
-
- NONE. Requires DOS 2.x or 3.x to be utilized.
-
- ANYWHERE is distributed to the Public Domain as an ARCHIVE file
- utilizing ARC50.EXE as the compression routine. It consists of three
- files.
- 1. AW.EXE Executable Code.
- 2. ANYWHERE.C Program source.
- 3. ANYWHERE.DOC Documentation.
-
- PROGRAM DESCRIPTION:
-
- ANYWHERE Locates files on hard drives on the IBMPC. Can be setup to
- search mulitple hard drives or diskettes utilizing an environment
- string.
-
- PROGRAM USAGE:
-
- AW [d:][\path\]filespec
-
- Required parameters:
-
- filespec the file specification that ANYWHERE is to
- search for. Must include the extension if
- ANYWHERE is to resolve the filespec correctly
- since nothing will be appended to the specifi-
- cation. Can (and most times will) include
- DOS global substitution characters "*" and "?".
-
- Optional parameters:
-
- d: A drive specifier to tell ANYWHERE to restrict
- the search to a particular drive.
-
- \path\ Restricts ANYWHERE to begin searching from the
- specified path instead of begining at the root
- directory.
-
- Usage Example:
-
- AW D:FY85*.WK?
-
- ANYWHERE is to search the "D" drive for any file with FY85
- as the first four characters and WK as the first and second
- characters of the extension. The third charcter of the
- extension can be anything. (i.e. Lotus 123 version 1a and
- version 2 worksheets dealing with fiscal year 1985). The
- is to begin in the ROOT directory of the "D" drive.
-
- AW \LOTUS\*.PRN
-
- ANYWHERE is to search the current working directory and any
- directories specified in the AWDISK= environment string for
- files that are under the LOTUS main subdirectory and have
- the extension .PRN.
-
- Environment String Specification:
-
- set AWDISK=d:[;d:[;d:.....d:]]
-
- Required Parameters:
-
- NONE If the set command is issued without any para-
- meters it will nullify the Environment string
- and ANYWHERE will only search the current
- working directory or the specified drive if
- one was given in the command line parameter.
-
- Optional Parameters:
-
- d: Allows ANYWHERE to search multiple drives that
- are specified in the Environment string as well
- as the current working directory.
-
- Environment Examples:
-
- set AWDISK=c:
-
- ANYWHERE is to search the "C" drive and the current working
- directory if no drive specifier is given.
-
- SET AWDISK=C:;E:;D:
-
- ANYWHERE is to search the "C" drive, the "E" drive, and the
- "D" drive as well as the default directory in the order given
- if no drive specifier is given.
-
- Restrictions:
-
- The program cannot repeat cannot be used with any version of DOS
- below 2.x.
-
- AWDISK= must be capitalized. This is done automatically by
- DOS 3.0. Use set without any operands to ensure that this is
- true in prior or future releases.
-
- A limit of 16 drives can be specified in the environment string.
- If 16 drives are specified (Lord amighty why are you running DOS)
- the current working directory cannot be added to the search list.
-
- The program was linked using an 8K stack space. If this proves
- to be insuffiecient (Hasn't yet though) the stack must be increased
- using Microsoft's EXEMOD program distributed with the Microsoft's
- Assembler 4.0 or C compiler 3.0 as well perhaps with all the new
- versions of their other compilers. The program checks for stack
- usage so it will inform you if there is a stack problem.
-
- BUGS: !!!!!!!!!!!!!!!!!!!!!!
-
- If the environment string is terminated with a semicolon the current
- working directory will not be searched. Regard this as either a bug
- or a feature. Take your choice.
-
- The file spec must be legal (less than 64 characters including drive
- specifiers. If not string corruption can occur with unpredictable
- results. (i.e. Strange file names etc.)). This includes drive
- specifiers in the environment string.
-
- No validation is performed on the Drive specifiers. They are accepted
- as written. Message "Problem with looking thru........." will appear.
-
- Operation:
-
- ANYWHERE first determines whether or not a drive specification was
- contained in the command line parameter. If a drive specifier was
- included then no search is done for additional drives and the program
- immediately begins searching for the filespec given on the command
- line. If a path is given as well the search will be restricted to
- that drive and path. This is quickest form of searching.
-
- If there was no drive specification a search is made of the environment
- strings to see if any match the AWDISK= string. If no environment
- string matches then only the current working directory is searched
- for the file spec.
-
- If an environment string is located the drives are extracted in the
- the order given. Each drive found is examined to see if it matches
- the drive of the current working directory. If the current working
- directory is not matched up to a drive in the environment string it
- is added to the list of drives to search as the last drive.
-
- For each drive specified in the environment string as well as the
- default drive ANYWHERE begins from the ROOT directory unless a path
- is specified searching for matches on the filespec given on the
- command line.